#include "cpu/exec/template-start.h"

#define instr leave

static void do_execute() {
    REG(R_ESP) = REG(R_EBP);
    REG(R_EBP) = swaddr_read(REG(R_ESP), 4);
    REG(R_ESP) += 4;
    print_asm("leave");
}

make_helper(concat(leave_, SUFFIX)) {
    do_execute();
    return 1;
}

#include "cpu/exec/template-end.h"